//
//  RYQuerenXinxiCell.swift
//  SheYangBigData
//
//  Created by 宋海胜 on 2021/1/13.
//  Copyright © 2021 叁拾叁. All rights reserved.
//

import UIKit

class RYQuerenXinxiCell: SYBaseCell {
    
    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        v.layer.cornerRadius = 5
        v.layer.masksToBounds = true
        return v
    }()
    
    let nameLb: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x1D1D1D)
        v.font = 16.autoBoldFontSize()
        v.text = "认养信息"
        return v
    }()
    
    let wuping: RYQuerenWupingView = {
        let v = RYQuerenWupingView()
        return v
    }()
    
    func configure(_ model: RYProductDetailModel, _ num: Int) {
        wuping.configure(model, num)
    }

    override func initViews() {
        self.backgroundColor = Constant.bgViewColor
        addSubview(bgView)
        addSubview(wuping)
        addSubview(nameLb)
        bgView.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(15.autoWidth())
            make.bottom.equalToSuperview()
            make.left.equalToSuperview().offset(15.autoWidth())
            make.right.equalToSuperview().offset(-15.autoWidth())
        }
        nameLb.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(30.autoWidth())
            make.left.equalToSuperview().offset(30.autoWidth())
            make.right.equalToSuperview().offset(-30.autoWidth())
            make.height.equalTo(16.autoWidth())
        }
        wuping.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(55.autoWidth())
            make.left.equalToSuperview().offset(15.autoWidth())
            make.right.equalToSuperview().offset(-15.autoWidth())
            make.bottom.equalToSuperview().offset(-15.autoWidth())
        }
    }

}
